import type { Component } from 'vue'
import type { RouteRecordRaw } from 'vue-router'

function Layout(): Component {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw = {
  path: '/operation',
  component: Layout,
  redirect: '/operation/page',
  name: 'operationManagement',
  meta: {
    title: '仓内作业',
    icon: 'i-ep:Avatar',
    hidden: true,
  },
  children: [
    {
      path: 'processPage',
      component: () => import('@/views/operation/peocess.vue'),
      name: 'processPage',
      meta: {
        title: '仓内加工',
        activeMenu: '/operation/page',
      },
    },
    {
      path: 'movementPage',
      component: () => import('@/views/operation/move.vue'),
      name: 'movementPage',
      meta: {
        title: '库存移动',
        activeMenu: '/operation/page',
      },
    },
    {
      path: 'freezePage',
      component: () => import('@/views/baseInfo/warehouseInfo.vue'),
      name: 'freezePage',
      meta: {
        title: '库存冻结',
        activeMenu: '/operation/page',
      },
    },
    {
      path: 'adjustPage',
      component: () => import('@/views/baseInfo/warehouseInfo.vue'),
      name: 'adjustPage',
      meta: {
        title: '库存调整',
        activeMenu: '/operation/page',
      },
    },
    {
      path: 'checkPage',
      component: () => import('@/views/baseInfo/warehouseInfo.vue'),
      name: 'checkPage',
      meta: {
        title: '库存盘点',
        activeMenu: '/operation/page',
      },
    },
  ],
}

export default routes
